package com.wwtech.epp.ui.activity.friend.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.friend.UserDetailActivity;
import com.wwtech.epp.ui.activity.friend.contract.UserDetailContract;
import com.wwtech.epp.ui.activity.friend.presenter.UserDetailPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.friend
 * @Description: The moduele of UserDetailActivity, provide field for UserDetailActivity
 * @date 2017/08/31 21:45:09
 */
@Module
public class UserDetailModule {
    private final UserDetailContract.View mView;


    public UserDetailModule(UserDetailContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public UserDetailPresenter provideUserDetailPresenter(HttpAPIWrapper httpAPIWrapper, UserDetailActivity mActivity) {
        return new UserDetailPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public UserDetailActivity provideUserDetailActivity() {
        return (UserDetailActivity) mView;
    }
}